# 安装pip install pypinyin
#
import pypinyin

a = [
    {"name":"b某某"},
    {"name":"a某某"},
    {"name":"王某某"},
]

for i in a:
    name = i.get("name")
    print(name)
    n = pypinyin.pinyin(name, style=pypinyin.FIRST_LETTER)
    print(n)
    n = n[0][0]
    print(n)
    # print(type(n))
    print(n.upper())